import {marked} from "marked";

/**
 * AI消息
 */
const AssistantMessageItem = (props) => {
    return <div className="flex flex-row gap-[5px] my-[10px]">
        <div className="w-[45px]">
            <span className="iconfont icon-ChatGPT text-[40px] text-primary-color"></span>
        </div>
        <div className="flex flex-col flex-1 gap-[5px] overflow-auto">
            <div className="text-[12px] text-gray-700">{props.itemData.create_at}</div>
            <div
                className="bg-white text-[14px] leading-[22px] p-[6px] rounded-[6px]"
                dangerouslySetInnerHTML={{ __html: marked(props.itemData.content) }}
            >
            </div>
        </div>
        <div className="w-[45px]"></div>
    </div>
}

export default AssistantMessageItem;